package com.ruoyi.trade.service.impl;

import com.ruoyi.trade.domain.InvestmentInfo;
import com.ruoyi.trade.mapper.InvestmentInfoMapper;
import com.ruoyi.trade.service.IInvestmentInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 投资信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-24
 */
@Service
public class InvestmentInfoServiceImpl implements IInvestmentInfoService 
{
    @Autowired
    private InvestmentInfoMapper investmentInfoMapper;

    /**
     * 查询投资信息
     * 
     * @param investmentId 投资信息主键
     * @return 投资信息
     */
    @Override
    public InvestmentInfo selectInvestmentInfoByInvestmentId(Long investmentId)
    {
        return investmentInfoMapper.selectInvestmentInfoByInvestmentId(investmentId);
    }

    /**
     * 查询投资信息列表
     * 
     * @param investmentInfo 投资信息
     * @return 投资信息
     */
    @Override
    public List<InvestmentInfo> selectInvestmentInfoList(InvestmentInfo investmentInfo)
    {
        return investmentInfoMapper.selectInvestmentInfoList(investmentInfo);
    }

    /**
     * 新增投资信息
     * 
     * @param investmentInfo 投资信息
     * @return 结果
     */
    @Override
    public int insertInvestmentInfo(InvestmentInfo investmentInfo)
    {
        return investmentInfoMapper.insertInvestmentInfo(investmentInfo);
    }

    /**
     * 修改投资信息
     * 
     * @param investmentInfo 投资信息
     * @return 结果
     */
    @Override
    public int updateInvestmentInfo(InvestmentInfo investmentInfo)
    {
        return investmentInfoMapper.updateInvestmentInfo(investmentInfo);
    }

    /**
     * 批量删除投资信息
     * 
     * @param investmentIds 需要删除的投资信息主键
     * @return 结果
     */
    @Override
    public int deleteInvestmentInfoByInvestmentIds(Long[] investmentIds)
    {
        return investmentInfoMapper.deleteInvestmentInfoByInvestmentIds(investmentIds);
    }

    /**
     * 删除投资信息信息
     * 
     * @param investmentId 投资信息主键
     * @return 结果
     */
    @Override
    public int deleteInvestmentInfoByInvestmentId(Long investmentId)
    {
        return investmentInfoMapper.deleteInvestmentInfoByInvestmentId(investmentId);
    }
}
